php get all the mondays of the year

64

php get all the mondays of the year -

$endDate = strtotime($endDate);
for($i = strtotime('Monday', strtotime($startDate)); $i <= $endDate; $i = strtotime('+1 week', $i))
    echo date('l Y-m-d', $i);

Comments

Submit
0 Comments